/* ----- 全局重置 ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", "Microsoft YaHei", sans-serif;
    background: #f5f1e8;
    color: #171717;
    overflow-x: hidden;
}

/* ----- 鼠标光晕 ----- */
.cursor {
    position: fixed;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220, 180, 120, .35), transparent 70%);
    filter: blur(20px);
    pointer-events: none;
    z-index: 5;
}

/* ----- 导航栏 ----- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    background: rgba(245, 241, 232, .65);
    backdrop-filter: blur(20px);
    z-index: 20;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
    transition: opacity 0.3s;
}
.logo:hover {
    opacity: 0.7;
}

/* ----- 导航菜单容器（相对定位，用于滑块定位） ----- */
.menu {
    display: flex;
    position: relative;
    gap: 0;
}

.menu a {
    text-decoration: none;
    color: inherit;
    padding: 0 0 8px 0;
    margin-left: 35px;
    position: relative;
    z-index: 2;
}

.menu a:first-child {
    margin-left: 0;
}

.menu a span {
    font-size: 15px;
    color: #555;
    transition: color 0.3s;
    cursor: pointer;
}

.menu a:hover span {
    color: #b8860b;
}

/* ----- 滑块（滑动小条） ----- */
.menu .slider {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: #b8860b;
    border-radius: 2px;
    transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
    pointer-events: none;
}

/* 激活状态：文字变金色 */
.menu a.active span {
    color: #b8860b;
    font-weight: 600;
}

/* ----- 页面容器 ----- */
.page {
    display: none;
    min-height: 100vh;
    padding-top: 90px;
}
.page.active {
    display: block;
}

/* ----- 产品列表页 ----- */
.products-page {
    padding: 140px 8% 80px;
}

.products-header {
    text-align: center;
    margin-bottom: 60px;
}
.products-header h2 {
    font-size: 60px;
    letter-spacing: -4px;
    margin-bottom: 12px;
}
.products-header p {
    font-size: 20px;
    color: #777;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
}

.product-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s, box-shadow 0.4s;
    cursor: pointer;
    position: relative;
}
.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.product-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s;
}
.product-card:hover img {
    transform: scale(1.03);
}

.product-card .badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(23, 23, 23, 0.8);
    color: #f5f1e8;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(8px);
    letter-spacing: 0.5px;
}

.product-info {
    padding: 24px 26px 28px;
}
.product-info h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 6px;
}
.product-info .desc {
    font-size: 15px;
    color: #888;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}
.product-info .price {
    display: inline-block;
    font-weight: 600;
    color: #b8860b;
    font-size: 22px;
    letter-spacing: 0.5px;
}
.product-info .view-link {
    float: right;
    color: #999;
    font-size: 14px;
    transition: color 0.3s;
    margin-top: 4px;
}
.product-info .view-link:hover {
    color: #b8860b;
}

/* ----- 详情页 ----- */
.detail-page {
    padding: 140px 8% 80px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 80vh;
}

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
    color: #b8860b;
    cursor: pointer;
    font-size: 17px;
    font-weight: 500;
    transition: transform 0.2s;
    border: none;
    background: none;
    font-family: inherit;
}
.detail-back:hover {
    transform: translateX(-8px);
}
.detail-back svg {
    width: 20px;
    height: 20px;
}

.detail-container {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
    background: white;
    border-radius: 32px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

.detail-image {
    flex: 1 1 48%;
    min-width: 280px;
}
.detail-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    display: block;
}

.detail-content {
    flex: 1 1 44%;
}
.detail-content h2 {
    font-size: 42px;
    letter-spacing: -2px;
    margin-bottom: 16px;
    line-height: 1.2;
}
.detail-content .meta {
    color: #888;
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}
.detail-content .meta strong {
    color: #171717;
    font-weight: 600;
}
.detail-content .full-desc {
    font-size: 19px;
    line-height: 1.9;
    color: #444;
    margin: 28px 0 32px;
    padding: 20px 0;
    border-top: 1px solid #f0ebe3;
    border-bottom: 1px solid #f0ebe3;
}
.detail-content .price-large {
    font-size: 34px;
    font-weight: 700;
    color: #b8860b;
    letter-spacing: 1px;
}
.detail-content .detail-actions {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.button {
    display: inline-block;
    padding: 16px 44px;
    border-radius: 50px;
    background: #171717;
    color: white;
    text-decoration: none;
    transition: .4s;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
}
.button:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
}
.button-outline {
    background: transparent;
    color: #171717;
    border: 2px solid #171717;
}
.button-outline:hover {
    background: #171717;
    color: white;
}

/* ----- 空状态 ----- */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: #999;
}
.empty-state h3 {
    font-size: 28px;
    color: #555;
    margin-bottom: 12px;
}
.empty-state p {
    font-size: 18px;
}

/* ===== 文字流光效果 ===== */
h1,
h2,
.products-header h2,
.detail-content h2 {
    background-image: linear-gradient(120deg, #1a1a1a 0%, #3a3a3a 20%, #c9a84c 40%, #4a4a4a 60%, #1a1a1a 80%, #3a3a3a 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow:
        0 0 10px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 0, 0, 0.2),
        0 0 40px rgba(0, 0, 0, 0.1);
    animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% 0;
    }
    100% {
        background-position: 300% 0;
    }
}

/* ----- 加载提示 ----- */
.loading-tip {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
    font-size: 18px;
}

/* ----- 响应式 ----- */
@media (max-width: 900px) {
    .products-header h2 {
        font-size: 40px;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 28px;
    }
    .detail-container {
        padding: 24px;
        flex-direction: column;
    }
    .detail-content h2 {
        font-size: 32px;
    }
    .menu a {
        margin-left: 18px;
    }
    .menu a span {
        font-size: 14px;
    }
    .logo {
        font-size: 18px;
        letter-spacing: 2px;
    }
    .products-page {
        padding: 120px 5% 60px;
    }
    .detail-page {
        padding: 120px 5% 60px;
    }
}

@media (max-width: 600px) {
    .menu a {
        display: none;
    }
    .logo {
        font-size: 16px;
        letter-spacing: 1px;
    }
    .product-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .products-header h2 {
        font-size: 32px;
    }
    .products-header p {
        font-size: 16px;
    }
    .detail-container {
        padding: 16px;
        border-radius: 20px;
    }
    .detail-content h2 {
        font-size: 28px;
    }
    .detail-content .full-desc {
        font-size: 16px;
    }
    .product-card img {
        height: 200px;
    }
    .button {
        padding: 14px 30px;
        font-size: 15px;
        width: 100%;
        text-align: center;
    }
    .detail-content .detail-actions {
        flex-direction: column;
    }
    .products-page {
        padding: 110px 4% 40px;
    }
    .detail-page {
        padding: 110px 4% 40px;
    }
}
/* ===== 语言切换按钮样式 ===== */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 30px;
    font-size: 14px;
}
.language-switcher .lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    transition: all 0.3s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
}
.language-switcher .lang-btn:hover {
    color: #b8860b;
    background: rgba(184, 134, 11, 0.08);
}
.language-switcher .lang-btn.active {
    color: #b8860b;
    font-weight: 600;
    background: rgba(184, 134, 11, 0.1);
}
.language-switcher .lang-flag { font-size: 16px; }
.language-switcher .lang-name { font-size: 13px; }
.language-switcher .lang-divider { color: #ddd; }

/* 手机端适配：隐藏文字只显示国旗 */
@media (max-width: 768px) {
    .language-switcher { margin-left: 12px; }
    .language-switcher .lang-name { display: none; }
    .language-switcher .lang-flag { font-size: 18px; }
}
@media (max-width: 600px) {
    .language-switcher { margin-left: 8px; }
}